/*
   @Copyright:Luogu
   @Author:   tjyemail
   @Problem:  https://www.luogu.com.cn/problem/P1919
   @Language: C++
   @Datetime: 20-12-14 17:07
   */

#include <bits/stdc++.h>
using namespace std;

template<typename T>
struct CPX {
	T mreal, mimag;
	CPX(T r=0, T i=0):mreal(r), mimag(i){}
	T real() {return mreal;}
	T imag() {return mimag;}
	void real(T r) {mreal=r;}
	void imag(T i) {mimag=i;}
	template<typename F>
	friend CPX<F> operator+(const CPX<F> &a, const CPX<F> &b);
	template<typename F>
	friend CPX<F> operator-(const CPX<F> &a, const CPX<F> &b);
	template<typename F>
	friend CPX<F> operator*(const CPX<F> &a, const CPX<F> &b);
	CPX<T> operator+=(const CPX<T> &a) {return *this=*this+a;}
	CPX<T> operator*=(const CPX<T> &a) {return *this=*this*a;}
};

template<typename T>
inline CPX<T> operator+(const CPX<T> &a, const CPX<T> &b) {
	CPX<T> c;
	c.mreal = a.mreal + b.mreal;
	c.mimag = a.mimag + b.mimag;
	return c;
}
template<typename T>
inline CPX<T> operator-(const CPX<T> &a, const CPX<T> &b) {
	CPX<T> c;
	c.mreal = a.mreal - b.mreal;
	c.mimag = a.mimag - b.mimag;
	return c;
}
template<typename T>
inline CPX<T> operator*(const CPX<T> &a, const CPX<T> &b) {
	CPX<T> c;
	c.mreal=a.mreal*b.mreal - a.mimag*b.mimag;
	c.mimag=a.mreal*b.mimag + a.mimag*b.mreal;
	return c;
}

//typedef complex<double> CP;
typedef CPX<double> CP;

void fft(vector<CP> &A, const vector<int> &bits, int n, int inv) {
	// bit reverse
	for(int i=0; i<n; ++i)
		if (i<bits[i]) swap(A[i], A[bits[i]]);
	static const double PI = acos(-1);
	for(int mid=1; mid<n; mid<<=1) {
		const CP wn(cos(PI/mid), inv*sin(PI/mid));
		for(int offset=0; offset<n; offset+=mid<<1) {
			CP w(1, 0);
			for(int t=0; t<mid; ++t, w*=wn) {
				const int i=offset+t, j=offset+mid+t;
				// butterfly transform
				const CP tmp = w*A[j];
				A[j] = A[i]-tmp;
				A[i] += tmp;
			}
		}
	}
}

// big endian
string mulfft(const string &a, const string &b)
{
	// prepare n=2^bit, bit reverse array
	int la = a.length(), lb = b.length(), n = 1, bit = 0;
	while(n<la+lb) n<<=1, ++bit;
	vector<int> bits(n, 0);
	for(int i=1; i<n; ++i)
		bits[i] = (bits[i>>1]>>1) | ((i&1)<<(bit-1));
	// convert string to complex array at little endian
	vector<CP> ca(n), cb(n);
	for(int i=la; i--; ca[i].real(a[la-i-1]-'0'));
	for(int i=lb; i--; cb[i].real(b[lb-i-1]-'0'));
	// fft
	fft(ca, bits, n, 1);
	fft(cb, bits, n, 1);
	for(int i=n; i--; ca[i]*=cb[i]);
	fft(ca, bits, n, -1); // ifft - do not forget zk/n
	// convert complex array to string at little endian
	string c(la+lb, '0');
	for(long i=0, t=0; i<la+lb; ++i) {
		t += (long)(ca[i].real()/n+0.5);
		c[i] = t%10 + '0';
		t /= 10;
	}
	// trim last 0
	while(!c.empty() && c.back()=='0') c.pop_back();
	if (c.empty()) return "0";
	reverse(c.begin(), c.end());
	return c;
}

int main()
{
	for(string a, b, c; cin>>a>>b; ) {
		c = mulfft(a, b);
		cout<<c<<endl;
	}
	return 0;
}
